const datetostring = function (date: Date): string {
  const Y = date.getFullYear();
  const M = date.getMonth() + 1;
  const D = date.getDate();
  return Y + '-' + (M < 10 ? '0' + M : M) + '-' + (D < 10 ? '0' + D : D);
};

export default datetostring;
